W13: Networking and Communications


Week #12 is gone and it didn't feel as a whole week, lots of work. Todar we begin week 13 which is about Networking and Communications, this means we have new assignmets and new challenges. During this week we don't need to use machines or material like we did last week, but we are using components that will help in the communication via wired or wireless network. So let's get started, tiredness is already feeling but always trying to have a good attitude for what is coming. So now join me in this new week journey and see what comes along, always hoping for the best. This are the assignments I have to complete:

This week assignmets are:

Group assignments:

Individual assignments:

In this week assignments i'm using:

Components
Xiao ESP32-S3


Description components
Imagen 1

Is a diminutive development boards, sharing a similar hardware structure, where the size is literally thumb-sized. Integrates camera sensor, digital microphone and SD card supporting. Combining embedded ML computing power and photography capability, this development board can be your great tool to get started with intelligent voice and vision AI.


Data from: Xiao ESP32S3


Group assignments


A). Send a message between two projects

For this assignment I need to communicate between two projects. Here are the steps of what I did to complete this part:

A1). UART communication

Before I start with this par of the assignment we need to understand about UART communication.

UART Communication stands for Universal asynchronous receiver-transmitter. It is a dedicated hardware device that performs asynchronous serial communication. It provides features for the configuration of data format and transmission speeds at different baud rates. A driver circuit handles electric signaling levels between two circuits. A Universal asynchronous receiver-transmitter (UART) Communication is usually an individual component or part of an integrated circuit. We can use it for communications over a computer or its peripheral devices such as a mouse, monitor or printer. In microcontroller chips, there are usually a number of dedicated UART hardware peripherals available.

Universal Asynchronous Receive Transmit (UART) or Serial communication is one of the most simple communication protocols between two devices. It transfers data between devices by connecting two wires between the devices, one is the transmission line while the other is the receiving line. The data transfers bit by bit digitally in form of bits from one device to another. The main advantage of this communication protocol is that its not necessary for both the devices to have the same operating frequency. For example, two microcontrollers operating at different clock frequencies can communicate with each other easily via serial communication. However, a predefined bit rate that is referred to as baud rate usually set in the flash memory of both microcontrollers for the instruction to be understood by both the devices.

Data from: UART communication

A2). UART communication

First I need to prepare the connection. This is what i'm going to need:

A3). Connections between components:

In this section i'll show how the connections should be:

A3.1.) Xiao ESP32-S3 configuration.

A4.) Xiao ESP32-S3 connection.

In this part i'm goint to connect two xiao ESP32-S3. As I commented in the last section we got to make sure to connect everything properly. Let me show you how I did it:



Individual assignments


A). Design, build, and connect wired or wireless node(s) with network or bus addresses and local input &/or output device(s)

In the next part i'm using the XIAO_ESP32S3 microcontroller. This microcontroller has the wi-fi feature, so I decide to use it as my communication protocol for this part. It's my first time connecting this type of components. I am familiar with connecting routers or switches for example in a data network of school or company.

A1). Turning on the Built_In sensor via wi-fi.

I will try to turn on and off a led via Wi-fi. The idea is to send a signal to the XIAO_ESP32S3 so it can change the state of the led.

A2). Scanning wi-fi networks

As my first part of this assignmets I have to make sure my ESP32-S3 detects wi-fi networks. I use an example from the IDE Arduino. I clic con:

In the next images you can see the result of the scanning:

  1. In the fisrt image you can see that the initial scanning wasn´t detecting any wi-fi networks. FYI: i'm at the university, I thought it was a security thing or something but I didn't have the antenna connected yet (P.I.C.N.I.C error).
  2. In the second one, after connecting the antenna, it show the networks that were available.
  3. And just to see how much time it took to detect another wi-fi network, I turn on my hotspot. You can see the name

A3). Now, i'm going to connect to the internet

Now that I know that my Xiao detects the wi-fi networks, i'm going to try to connect to one of them. In this part I try another code and:

Now I will try with another network and see if it works. Important, I have to change the credentials (SSD and password).

I decide to make a third shot. Hotspot from my cel phone but connected to the universities wifi. So let´s give it a shot.

This is my fourth try, now i'm using my internet and activating my hotspot. Hope this works!. So let´s give it a shot.

B). Design and build wired or wireless node(s) with network or bus addresses and local input &/or output device(s)

In this second part I'm using the WIFI.h library and as I did with the network name (SSD) and password i'm going to have to change it.

In this part i'm going to share with you the code and changes I did. the code is from an example of the Arduino IDE:

I'm going to share with you some videos I took of the working connection.


Problem section


A). Wi-Fi antenna

This is a "picnic error". While I was making some test with the XIAO ESP32S3, scanning wifi netowrks, it didn't scan anything. What did I do?

B). Uploading the code to the xiao.

I had a lot of trouble with this. When I upload the code to the xiao it show a problem. This happened right after connecting my xiao to a wifi network. So, I did several things:


Final part


Files

In here you can find the files I use for the assignments:

Conclusions and recomendations

What did I learn in this week?